package com.saris.primego.dao;

import com.saris.primego.pojo.entity.Setmeal;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SetmealRepository extends JpaRepository<Setmeal, Long>, JpaSpecificationExecutor<Setmeal> {
    List<Setmeal> findSetmealsByCategoryId(Long categoryId);

    List<Setmeal> findAllByCategoryIdAndStatus(Long categoryId, Integer status);

    long countByStatus(Integer status);
}
